/* Copyright 2018 JDCLOUD.COM

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http:#www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

敏感操作配置
操作敏感操作配置接口

OpenAPI spec version: v1
Contact: 

NOTE: This class is auto generated by the jdcloud code generator program.
*/

#import <Foundation/Foundation.h>
#import <JDCloudOCSDKSop/SopApiModel.h>


@implementation SopGetSecurityTokenResult
-(id) initWithSecurityToken:(NSString*) securityToken { 
    self.securityToken = securityToken;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self securityToken])
    {
        [result setValue:[self securityToken] forKey:@"securityToken"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.securityToken = [dictionary objectForKey:@"securityToken"];
    return self;
} 

@end
@implementation SopGetSensitiveOpSettingResult
-(id) initWithStatus:(NSNumber*) status
        type:(NSNumber*)type
        extInfo:(NSString*)extInfo { 
    self.status = status;               
    self.type = type;               
    self.extInfo = extInfo;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self status])
    {
        [result setValue:[self status] forKey:@"status"];
    }
    if([self type])
    {
        [result setValue:[self type] forKey:@"type"];
    }
    if([self extInfo])
    {
        [result setValue:[self extInfo] forKey:@"extInfo"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.status = [dictionary objectForKey:@"status"];
    self.type = [dictionary objectForKey:@"type"];
    self.extInfo = [dictionary objectForKey:@"extInfo"];
    return self;
} 

@end
@implementation SopGetSensitiveOpSettingRequest
-(id) initWithRegion:(NSString *)regionId
action:(NSString*)action { 
    self.regionId = regionId;
    self.action = action;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
action:(NSString*)action { 
    self.regionId = regionId;
    self.version = version;
    self.action = action;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self action])
    {
        [result setValue:[self action] forKey:@"action"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.action = [dictionary objectForKey:@"action"];
    return self;
} 

@end
@implementation SopGetSecurityTokenRequest
-(id) initWithRegion:(NSString *)regionId
getSecurityTokenInfo:(GetSecurityTokenInfo*)getSecurityTokenInfo { 
    self.regionId = regionId;
    self.getSecurityTokenInfo = getSecurityTokenInfo;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
getSecurityTokenInfo:(GetSecurityTokenInfo*)getSecurityTokenInfo { 
    self.regionId = regionId;
    self.version = version;
    self.getSecurityTokenInfo = getSecurityTokenInfo;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self getSecurityTokenInfo])
    {
        [result setValue:[[self getSecurityTokenInfo] dictionary]forKey:@"getSecurityTokenInfo"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.getSecurityTokenInfo = [[GetSecurityTokenInfo alloc]initWithDic:[dictionary objectForKey:@"getSecurityTokenInfo"]];
    return self;
} 

@end
  
@implementation SopGetSecurityTokenResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
SopGetSecurityTokenResult* result = [[SopGetSecurityTokenResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(SopGetSecurityTokenResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
  
@implementation SopGetSensitiveOpSettingResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
SopGetSensitiveOpSettingResult* result = [[SopGetSensitiveOpSettingResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(SopGetSensitiveOpSettingResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
 
